/*
 * Copyright (c) 2018-2999 九五云信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 */

package com.yami.shop.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yami.shop.bean.app.dto.StationSalesDto;
import com.yami.shop.bean.param.StationDetailParam;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.bean.model.Station;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 自提点
 *
 * @author YXF
 * @date 2020-04-23 15:18:29
 */
public interface StationMapper extends BaseMapper<Station> {

    void updateStatus(@Param("handleId") Long handleId, @Param("status") int status);

    IPage<Station> getPage(PageParam<Station> page, @Param("station") Station station);

    Station getStationInfoById(@Param("stationId") Long stationId);

    Station getStationInfoByAccount(String account);

    List<StationSalesDto> getStationSalesRecord(@Param("shopId") Long shopId, @Param("stationId") Long stationId, @Param("day") Date day, @Param("month") Date month);

    int getCountByAccount(@Param("account") String account, @Param("stationId") Long stationId);

    IPage<StationDetailParam> getStationList(Page page, @Param("lat") Double lat, @Param("lng") Double lng, @Param("stationName") String stationName,
                                             @Param("shopId") Long shopId, @Param("stationId") Long stationId);

    StationDetailParam selectGoOften(@Param("userId") String userId, @Param("shopId") Long shopId);

    void changeStationAddr(@Param("stationId") Long stationId, @Param("addr") String addr, @Param("phone") String phone);
}
